package com.itheima.d7_tcp4;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;

public class CilentTheard implements Runnable{
    public Socket socket;

    public CilentTheard(Socket socket) {
        this.socket = socket;
    }

    @Override
    public void run() {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            while (true){
                String s = br.readLine();
                System.out.println("fw:"+s);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
